import App from './App'
import request from 'common/request.js'
Vue.prototype.$request = request 
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif

Vue.prototype.checkLogin = function(){
	const token = uni.getStorageSync('usertoken')
	if(token === ''){ // 本地没有token表示未登录
		console.log('未登录返回到登录页')
		uni.reLaunch({
			url:'../index/index'
		})
		return false 
	// } else if (token){
	// 	uni.switchTab({
	// 		url:'../agency/agency'
	// 	})
	}
}